* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    /* IE和Edge */
    -ms-overflow-style: none;
    /* Firefox */
    scrollbar-width: none;
}

a {
    color: #444;
    text-decoration: none;
}

/* 隐藏所有滚动条 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* Firefox隐藏滚动条 */
.scroll-wrapper {
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.container {
    height: 100vh;
    /* 禁止外层容器滚动 */
    overflow: hidden;
    padding: 30px;
}

/* 模糊背景层 */
.background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/background.jpg') center/cover;
    filter: blur(10px);
    opacity: 0.8;
    z-index: -1;
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3ecdaf;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-decoration: none;
    z-index: 1000;
}

/* 页面标题 */
.page-header {
    font-size: 1.4rem;
    color: #333;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.page-input {
    height: 40px;
    padding: 0;
    /* 清除父容器内边距 */
    color: #333;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.page-input input {
    /* 宽度填充 */
    width: 100%;
    /* 高度填充 */
    height: 100%;
    /* 包含内边距 */
    box-sizing: border-box;
    /* 可选的文本内边距 */
    padding: 0 12px;
    /* 移除边框 */
    border: none;
    /* 移除聚焦轮廓 */
    outline: none;
    /* 透明背景 */
    background: transparent;
}

.mainContent {
    max-height: 70vh;
    overflow-y: scroll;
}

.mainContent::-webkit-scrollbar {
    display: none;
}

/* 遮罩层基础样式 */
.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    /* 纯黑色背景，适用于不支持rgba的浏览器 */
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明黑色背景 */
    transition: opacity 0.3s ease;
    /* 渐变效果 */
    /* 半透明黑色背景 */
    background-color: rgba(0, 0, 0, 0.5);
    /* 确保遮罩层在最上面 */
    z-index: 10000;
    /* 初始状态不显示 */
    display: none;
}

.mask-info {
    text-align: center;
    color: white;
    font-size: xx-large;
    position: relative;
    left: 0;
    top: 50%;
}

/* 用户信息区 */
.profile-section {
    text-align: center;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.username {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 5px;
}

.user-level {
    color: #666;
    font-size: 0.9rem;
}

/* 功能模块区 */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.module-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.module-item:hover {
    transform: translateY(-3px);
}

.module-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.module-title {
    font-size: 0.9rem;
    color: #444;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

/* 卡片内容布局 */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-title {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 新增设备卡片样式 */
.user-container {
    display: grid;
    gap: 15px;
    padding-bottom: 30px;
}

.user-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.user-card:hover {
    transform: translateY(-2px);
}

/* 用户头像 */
.user-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
    margin-bottom: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    float: left;
}

.user-name {
    color: #333;
    margin-top: 5px;
    font-weight: 500;
}

.user-meta {
    display: inline-flex;
    flex-wrap: wrap;
    font-size: small;
    gap: 10px;
    color: #666;
}

.meta-item {
    display: inline-flex;
    align-items: center;
}

.meta-item::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #4A90E2;
    border-radius: 50%;
    margin-right: 8px;
}

.user-gender {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.gender-male {
    background: rgba(74, 144, 226, 0.1);
    color: #4A90E2;
    margin-top: 5px;
}

.gender-female {
    background: rgba(255, 51, 153, 0.1);
    color: #FF3399;
    margin-top: 5px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

/* 开关组样式 */
.switch-group {
    display: grid;
    gap: 10px;
}

.switch-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.switch-label {
    font-size: 0.9rem;
    color: #666;
}

/* 开关控件 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #eee;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
    background: #4A90E2;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.addBtn {
    text-align: center;
    font-size: larger;
    background: #3ecdaf;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .user-container {
        display: grid;
        gap: 15px;
        padding-bottom: 50px;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .user-container {
        display: grid;
        gap: 15px;
        padding-bottom: 80px;
    }
}